<?php
namespace app\hongyanche\controller;
class Worktable{
    private function view()
    {
        // return view('',['admin'=>'CAFE']);
    	$user = model('user');
    	$user->wechatAutoLogin();
    	$admin = request()->action();
    	if(!$user->logined()){
    		return view('login',['admin'=>ucwords($admin)]);
    	}
        $adm = model('admin');
        $adm = $admin == 'manage'?$adm->is('ultimate'):$adm->is($admin);
    	if(!isset($adm['state']) || !$adm['state']){
            return view('error',['admin'=>ucwords($admin)]);
    	}
    	return view();
    }
    function mall(){
        return $this->view();
    }
	function manage(){
		return $this->view();
	}
	function client(){
		return $this->view();
	}
	function cafe(){
		return $this->view();
	}
    function finance(){
        return $this->view();
    }
    function space(){
        return $this->view();
    }
    function marketing(){
        return $this->view();
    }
}